body {
    font-family: 'Arial', sans-serif;
    color: #333;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
}

header, footer {
    background-color: #fff;
    padding: 15px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo img {
    height: 50px;
}

.user-info {
    float: right;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    background-color: #e0e0e0;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    padding: 10px;
    display: block;
}

nav ul li a:hover {
    background-color: #ccc;
}

main {
    padding: 20px;
}

.product-list {
    width: 100%;
    border-collapse: collapse;
}

.product-list th, .product-list td {
    padding: 10px;
    text-align: center;
}

.product-list th {
    background-color: #f0f0f0;
}

.product-list tr {
    border-bottom: 1px solid #ccc; /* 添加横线分隔 */
}

.product-list tr:last-child {
    border-bottom: none; /* 最后一个商品不显示底部横线 */
}

.quantity-control {
    align-items: center;
    justify-content: center;
}

.quantity-input {
    width: 50px;
    text-align: center;
    margin: 0 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.delete-button {
    background-color: #f0f0f0;
    border: none;
    padding: 10px 10px;
    cursor: pointer;
    border-radius: 3px;
}

footer p {
    text-align: center;
    color: #777;
    margin: 0;
    padding: 10px 0;
}

.footer-summary {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-weight: bold;
    margin-top: 10px;
}

.checkout-button, .delete-selected-button {
    display: block;
    background-color: #ff5722;
    color: white;
    padding: 10px 20px;
    text-align: center;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    margin-top: 10px;
}

.checkout-button:hover, .delete-selected-button:hover {
    background-color: #e64a19;
}

/* 增加全选样式 */
.select-all {
    margin-bottom: 10px;
}

.alert-box {
    position: fixed;
    top: 20px; /* 距离顶部20px */
    left: 50%; /* 水平居中 */
    transform: translateX(-50%); /* 向左移动自身宽度的一半，实现居中 */
    background-color: #28a745; /* 绿色背景，表示成功 */
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    z-index: 9999; /* 使弹窗在其他元素之上 */
    transition: opacity 0.5s ease; /* 添加渐变效果 */
}

nav ul li .dropdown {
    display: none; /* 默认隐藏子菜单 */
    position: absolute;
    background-color: #fff; /* 设置下拉菜单的背景颜色 */
    border: 1px solid #ccc; /* 边框 */
    z-index: 1;
}

nav ul li .dropdown {
    display: none; /* 默认隐藏子菜单 */
    position: absolute;
    background-color: #fff; /* 设置下拉菜单的背景颜色 */
    border: 1px solid #ccc; /* 边框 */
    z-index: 1;
    min-width: 150px; /* 设置下拉菜单最小宽度 */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* 添加阴影效果 */
}

nav ul li:hover .dropdown {
    display: block; /* 鼠标悬停时显示子菜单 */
}

nav ul li .dropdown li {
    display: block; /* 使子菜单项垂直排列 */
}

nav ul li .dropdown li a {
    display: block; /* 链接占据全宽 */
    padding: 10px 15px; /* 增加内边距 */
    text-decoration: none; /* 去掉下划线 */
    color: #333; /* 字体颜色 */
    transition: background-color 0.3s; /* 增加过渡效果 */
}

nav ul li .dropdown li a:hover {
    background-color: #f2f2f2; /* 悬停时背景色 */
    color: #000; /* 悬停时字体颜色 */
}